#汉诺塔
def move(n, a, b, c):
    if n == 1:
        print(a, '-->', c)
    else:
        move(n-1, a, c, b) #把前n-1块从柱子A移至柱子B
        print(a, '-->', c) #把最大块从柱子A移至柱子C
        move(n-1, b, a, c) #把前n-1块从柱子B移至柱子C
    return

move(3, 'A', 'B', 'C')
